import { ADDTITLE } from '../constant'

// 初始化数据

const initState = ['主任', '副主任', '主治医师', '副主治医师', '实习医生']
export default function addReducer(preState = initState, action) {
    const { type, data } = action
    switch (type) {
        case ADDTITLE: return [data, ...preState]

        default: return preState
    }
}